import React, {  CSSProperties } from 'react'
import { Card } from 'antd'
import ListItem from '../listItem'
import styles from './index.module.scss'

interface Props {
    list: DebugItem[]
}

const DebugList: React.FC<Props> = ({  list }) => {
    const itemStyles: CSSProperties = {
        marginTop: 20
    }

    return (
        <div className={styles.list_wrap}>
            <Card title="调试列表：">
                {
                    list.map((item, index) => {
                        return <ListItem item={item} key={item.url} rootStyles={ index > 0 ? itemStyles : {} } />
                    })
                }
            </Card>
        </div>
    )
}

export default DebugList